package com.caishi.lkx.order.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.caishi.lkx.order.dto.InvoiceFpmx;
import com.caishi.lkx.order.ienum.status.InvoiceStatus;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.zzw.common.entity.impl.BaseIntEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.math.BigDecimal;
import java.util.List;

/**
 * 开票实体
 * @author by lkx
 * date: 2024/03/13
 */

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("or_order_Invoice")
public class OrderInvoiceModel extends BaseIntEntity<OrderInvoiceModel> {
    /**
     * 订单Id
     */
    private String orderId;

    /// 开票状态
    private InvoiceStatus invoiceStatus;

    ///销售方纳税人识别号统一社会信息代码
    private String xsfnsrsbh;

    ///销售方名称
    private String xsfmc;

    ///购买方纳税人识别号统一社会信息代码
    private String gmfnsrsbh;

    ///购买方名称
    private String gmfmc;

    ///开票金额
    private BigDecimal hjje;

    ///合计税额
    private BigDecimal hjse;
    ///价税合计
    private BigDecimal jshj;
    ///开票人
    private String kpr;

    ///货物或应税劳务服务名称
    private String hwhyslwfwmc;
    ///商品服务简称
    private String spfwjc;
    ///项目名称
    private String xmmc;

    @TableField(value = "fpmx_list", typeHandler = JacksonTypeHandler.class)
    @Schema(title = "发票明细集合")
    @JsonIgnore
    private List<InvoiceFpmx> fpmxList;
}
